package com.b511.swpu.cementbackend.repository;

import com.b511.swpu.cementbackend.entity.Data_Classification;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

// 对应表 Data_Classification表
public interface Data_ClassificationRepository extends JpaRepository<Data_Classification, Long>,JpaSpecificationExecutor<Data_Classification> {

    @Query(value = "select * from Data_Classification order by CODE",nativeQuery = true)
    List<Data_Classification> findAllAndOrderByCode();
}
